import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listFranchiser(query) {
  return request({
    url: '/system/franchiser/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getFranchiser(id) {
  return request({
    url: '/system/franchiser/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addFranchiser(data) {
  return request({
    url: '/system/franchiser',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateFranchiser(data) {
  return request({
    url: '/system/franchiser',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delFranchiser(id) {
  return request({
    url: '/system/franchiser/' + id,
    method: 'delete'
  })
}

export function updateFranchiserPassword(data) {
  return request({
    url: '/system/franchiser/update_password',
    method: 'get',
    params: data
  })
}

export function updateFranchiserWarTeam(data) {
  return request({
    url: '/system/franchiser/update_war_team',
    method: 'get',
    params: data
  })
}

export function getFranchiserWarTeamList(data) {
  return request({
    url: '/system/franchiser/get_war_team_list',
    method: 'get',
    params: data
  })
}

export function fetchAllFranchiser(data) {
  return request({
    url: '/system/franchiser/fetch_all_franchiser',
    method: 'get',
    params: data
  })
}

export function deleteAllFranchiser() {
  return request({
    url: '/system/franchiser/delete_all_franchiser',
    method: 'get',
  })
}

export function fetchAllFranchiserTask() {
  return request({
    url: '/system/franchiser/fetch_franchiser_task',
    method: 'get',
  })
}
